<?php

//靓号码库模型
class accountModel extends Model
{
	private $tb='account_lib';
	
	//获取所有账号
	public function getall()
	{
		$sql="select account from $this->tb";
		return $this->db->getAll($sql);
	}
	//查找是否有此账号
	public function hasAcc($acc)
	{
		$sql="select count(*) from $this->tb where account=$acc";
		return $this->db->getOne($sql);
	}

	//删除条目
	public function delete($acc)
	{
		$sql="delete from $this->tb where account=$acc";
		if($this->db->set_query($sql))
		{
			return $this->db->affect_row();
		}
		return false;
	}
}